<template>
<div class="OLdiv1">
    <PxOLUp/>
    <PxOLUpEmpty v-show="UpShow!=0"></PxOLUpEmpty>
    <div class="TPmydiv1">
        <div v-for="(odata , index) in MyOrderData" :key="index">
            <PxOLProduct v-show="UpShow==0" :odata="odata"></PxOLProduct>
        </div>
        <div style="font-size:13px;text-align: center;margin-top:20px">快去加购订单吧！到底了...</div>
    </div>
    <PxOLProgress v-if="!RefreshPage"></PxOLProgress>
    <!-- <PxOLTestPage/> -->
    <PxDown/>
    <PxOLAxios/>
</div>
</template>

<script>
import PxDown from '../PxUniversalPage/PxDown.vue'
import PxOLUp from './PxOLUp.vue'
import PxOLUpEmpty from './PxOLUpEmpty.vue'
import PxOLProduct from './PxOLProduct.vue'
import PxOLAxios from './PxOLAxios.vue'
import PxOLProgress from './PxOLProgress.vue'
import PxOLTestPage from './PxOLTestPage.vue'
    export default {
        name:'PxOrderList',
        components:{PxDown,
                    PxOLUp,PxOLUpEmpty,PxOLProduct,PxOLAxios,PxOLProgress,PxOLTestPage},
        data(){
            return{
                Downimgshow:{'mainb':1,'maina':0,'cartb':1,'carta':0,'orderb':0,'ordera':1,'myb':1,'mya':0},
                UpShow:0,
                MyOrderData:[[]],
                RefreshPage:1,
            }
        },
        mounted(){
            this.$bus.$emit('Downimgshow',this.Downimgshow)
            this.$bus.$on('Upshow',(data)=>{
                this.UpShow=data
            })
            this.$bus.$on('MyOrderData',(MyOrderData)=>{
                this.MyOrderData=MyOrderData
                console.log(this.MyOrderData,'%%%%%');
            })
            this.$bus.$on('RefreshPage',(RefreshPage)=>{
                this.RefreshPage=RefreshPage
            })
        },
        beforeDestroy(){
            this.$bus.$off('Upshow')
            this.$bus.$off('MyOrderData')
            this.$bus.$off('RefreshPage')
        }
    }
</script>

<style scoped>
.OLdiv1{
    height: 100%;
    background-color: rgb(247, 247, 247);
}
.TPmydiv1{
    padding-top: 40px;
    margin-bottom: 80px;
}
</style>